home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Development Platforms / Apple II / Essentials / Technical.Notes / IIGS / TN.IIGS.072 < prev    next >
Encoding:
Text File  |  1991-01-11  |  4.2 KB  |  99 lines  |  [TEXT/pdos]

  1. Apple II
  2. Technical Notes
  3. _____________________________________________________________________________
  4.                                                   Developer Technical Support
  5.  
  6. Apple IIgs
  7. #72:    QuickDraw II Quirks
  8.  
  9. Revised by:     C.K. Haun <TR> & Dave Lyons                     November 1990
  10. Written by:     Dave Lyons                                      November 1989
  11.  
  12. This Technical Note points out some things things you need to watch out for
  13. when using QuickDraw II, especially with FastPort-aware and Shadowing modes.
  14. Changes since September 1990:  Added information about setting clipping buffer
  15. width with SetBufDims.
  16. _____________________________________________________________________________
  17.  
  18.  
  19. Shadowing
  20.  
  21. Bit 15 of the MasterSCB parameter to QDStartUp requests that QuickDraw II use
  22. the memory at $012000 to shadow onto the real screen memory at $E12000.  (This
  23. speeds up QuickDraw II, since memory in bank $01 can be read at full speed.)
  24.  
  25. Previously, QDShutDown on ROM 01 machines was not not disposing of the $012000
  26. memory block if it was allocated by QDStartUp.  In 5.0.3, it's fixed-your
  27. application does not need to worry about disposing of the shadow memory
  28. manually.
  29.  
  30. Also, when QDStartUp uses shadowing on ROM 01 it does not actually clear the
  31. bank one memory to black-the screen looks black, but when you start to draw you
  32. get weird garbage around the stuff you draw (this is true in 5.0.3 and
  33. earlier).  If you call RefreshDesktop before doing other drawing, it is not a
  34. problem.  If you need to force the screen to clear, you can call ClearScreen(0)
  35. right after QDStartUp.
  36.  
  37.  
  38. FastPort-Aware Anomaly
  39.  
  40. When the FastPort-aware bit is turned on in the MasterSCB parameter to
  41. QDStartUp, DrawPicture does not notice changes in the pen pattern.  If your
  42. application uses pictures, either directly or indirectly (i.e., by printing to
  43. the ImageWriter driver), you may need to leave FastPort-aware mode turned off
  44. to get the expected behavior.
  45.  
  46.  
  47. FastFont and Large Pixel Maps
  48.  
  49. FastFont does not work correctly when drawing past the first 64K of a pixel
  50. map.  If you are drawing text that uses FastFont (i.e., Shaston 8), you can
  51. avoid this problem by using a non-rectangular clipRgn.
  52.  
  53.  
  54. ScrollRect Fixed in 5.0.3
  55.  
  56. ScrollRect no longer hangs when scrolling with a small positive dY and a
  57. non-rectangular visRgn.
  58.  
  59.  
  60. Don't ShowPen While Collecting Polygons, Regions, or Pictures
  61.  
  62. The Macintosh QuickDraw documentation permits calling ShowPen after an
  63. OpenPoly, OpenRgn, or OpenPicture call to cause drawing calls to contribute to
  64. a polygon, region, or picture and draw to a pixel map at the same time.
  65.  
  66. The Apple IIgs QuickDraw II documentation does not say you can do that.  In
  67. some cases, it works, but it works "by accident" and it's not one of the things
  68. Apple tests or guarantees in QuickDraw II.
  69.  
  70.  
  71. You May Need SetBufDims!
  72.  
  73. The call description for SetBufDims on page 16-215 of Volume 2 of theToolbox
  74. Reference is misleading.  The note in the description states, "You only need to
  75. make this call if your application is going to use, or allow the user to
  76. choose, fonts that have unusually large values of chExtra and spExtra."  This
  77. is not true; you need to call SetBufDims to adjust the clipping buffers for
  78. your application if you plan to use a clipRgn that has a greater width than the
  79. width you passed at QDStartUp.
  80.  
  81. SetBufDims sets the clipping buffer width as well as that of the text buffer,
  82. so if you plan to use a clipping region larger than the startup port width you
  83. must use SetBufDims.
  84.  
  85. Be aware that this call may be necessary even if your application does not ever
  86. set a clipping region or rectangle.  Some toolbox calls assume that the
  87. clipping buffer size is correct based on the parameters passed to that routine.
  88. For example, if the locInfo you pass to CopyPixels has a width parameter that
  89. is wider than the width you passed at QDStartUp, CopyPixels may fail.  A safe
  90. rule of thumb is to make sure (possibly by setting) that the width parameter in
  91. the buffer dimensions is the same or greater than the widest width in the
  92. locInfo structures passed to routines that use them.
  93.  
  94.  
  95. Further Reference
  96. _____________________________________________________________________________
  97.   o  Apple IIgs Toolbox Reference, Volumes 1 and 3
  98.  
  99.